home *** CD-ROM | disk | FTP | other *** search
- #VRML V2.0 utf8 - PLATINUM technology, inc. 1997
- #ADD_TOUCH_SENSOR
-
- # Flip 180 degrees
-
- DEF $OBJECT_Flip_180_degrees Script {
- eventIn SFTime click
- eventOut SFRotation newRotation
- field SFRotation calcRotation 0 1 0 0
- field SFInt32 counter 0
-
- url"javascript:
- function click(value,ts)
- {
-
- counter=counter+1;
- if (counter==2)
- {counter=0;}
- calcRotation[3]=3.14*counter;
- newRotation=calcRotation;
- }
-
- "
- }
- # Animation path
-
-
- #route map
-
- ROUTE $OBJECT_Flip_180_degrees.newRotation TO $OBJECT.set_rotation
- ROUTE $OBJECTTS.touchTime TO $OBJECT_Flip_180_degrees.click
-
-
-
-
-